package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 课程附件
 */
@Data
public class CourseFile implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 文件名
     */
    private String name;

    /**
     * 文件地址
     */
    private String path;

    /**
     * 文件大小
     */
    private Double size;

    /**
     * 视频时长，单位秒
     */
    private Long seconds;

    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 视频时长，单位秒
     */
    private Boolean isView = false;

}